//
//  VPDownloadModel.h
//  VPDownloadManager
//
//  Created by vernepung on 16/3/10.
//  Copyright © 2016年 vernepung. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BaseModel.h"
/**
 *  下载状态
 */
typedef NS_OPTIONS(NSUInteger, kVPDownloadState)
{
    /**
     *  未开始下载 或下载删除了
     */
    kVPDownloadStateNormal      = 0,
    /**
     *  正在下载
     */
    kVPDownloadStateDownloading = 1 << 0,
    /**
     *  等待
     */
    kVPDownloadStateWaiting     = 1 << 1,
    /**
     *  暂停
     */
    kVPDownloadStatePause       = 1 << 2,
    /**
     *  完成
     */
    kVPDownloadStateCompleted   = 1 << 3,
    /**
     *  下载错误
     */
    kVPDownloadStateError       = 1 << 4,
    /**
     *  无网络
     */
    kVPDownloadStateNoNetwork      = 1 << 5,
    /**
     *  需要重新下载
     */
    kVPDownloadStateReload      = 1 << 6,
};
@interface VPDownloadModel : BaseModel
/**
 *  you must be override this property use your identity,
 *  when you want extends VPDownloadModel
 *  VPHTTPRequestOperationManager will use this property filter Model
 */
@property (copy,nonatomic) NSString *mainId;

@property (assign,nonatomic) kVPDownloadState downloadState;

@property (assign,nonatomic) long long readedBytes;

@property (assign,nonatomic) long long totalBytes;

@property (copy,nonatomic) NSString *fileUrl;

@property (readonly,copy,nonatomic) NSString *fileTempPath;

@property (readonly,copy,nonatomic) NSString *filePath;

@property (readonly,copy,nonatomic) NSString *fullFilePath;



@property (copy,nonatomic) NSString *fileName;
/***  附件名称*/
@property (copy,nonatomic) NSString *title;
/***  分类名称*/
@property (copy,nonatomic) NSString *categoryTitle;
/***  分类图*/
@property (copy,nonatomic) NSString *imageUrlString;

/**
 文件类型名称
 */
@property (copy,nonatomic) NSString *typeName;

/**
 是否在下载中心显示 
 */
@property (assign,nonatomic) BOOL isDownloadCenterValid;

@property (copy,nonatomic) NSString *suffix;

- (void)removeFiles;

- (BOOL)isCompleted;

@end
